package com.bw.conceller;

import com.bw.bean.User;
import com.bw.bean.User1;
import com.bw.service.IService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class Concaller {
    @Autowired
    IService iService;

    @RequestMapping("/add")
    public int add(User1 user1) {
        return iService.add(user1);
    }

    @RequestMapping("/list")
    public List<User> list() {
        return iService.list();
    }

    @RequestMapping("/del")
    public int del(int id) {
        return iService.del(id);
    }


    @RequestMapping("/del1")
    public int del1(String id) {
        return iService.del1(id);
    }

    @RequestMapping("/list2")
    public List<User1> list2(String name) {
        return iService.list2(name);
    }
    @RequestMapping("/list3")
    public List<User1> list3() {
        return iService.list3();
    }

}
